module App::View
    class New < ItemForm
        Simplified_times = false   # az ejfel betenne maskepp
        attr_reader :done

        def initialize(parent, type = App::Items::Task)
            @simplified_times = Simplified_times
            super(type)

            @parent = parent

            if type == App::Items::Client
            elsif type == App::Items::Project
            elsif type == App::Items::Task
                # TODO szurkitse/tuntesse el a tobbit
                @done = Qt::CheckBox.new "already done, don't start the timer"
                layout.insertWidget 1, @done

                start = Time.now - 10*60
                @start.setDate Qt::Date.new(start.year, start.month, start.day)
                @start.setTime Qt::Time.new(start.hour, start.min)
                stop = Time.now
                @stop.setDate Qt::Date.new(stop.year, stop.month, stop.day)
                @stop.setTime Qt::Time.new(stop.hour, stop.min)
                @spinbox_min_duration.setValue 10
            end

            #s+" Name?"
            show
        end
    end
end
